﻿@{
    ViewBag.Title = "角色管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">角色管理 
</h3>
<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <i class="fa fa-home"></i>
            <a href="@Url.Action("Index", "Home")">首页</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="@Url.Action("Index", "BfRole")">角色管理</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">新建</a>
        </li>
    </ul>
</div>
<!-- END PAGE HEADER -->

<div class="portlet box purple">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-cogs"></i>
        </div>
        <div class="tools">
            <a href="javascript:;" class="collapse"></a>
        </div>
        <div class="actions">
            <a class="btn green" href="@Url.Action("Index", new { gridStage = Request.QueryString["gridStage"] })"><i class="fa  fa-mail-reply"></i>返回</a>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form id="BfRoleAdd" method="post" class="form-horizontal">
            <div class="form-body">
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        角色编号<span class="required" aria-required="true">
                            *
                        </span>
                    </label>
                    <div class="col-md-4">
                        <input type="text" id="txtCODE" name="CODE" class="form-control" placeholder="请输入角色编号">
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        角色名称<span class="required" aria-required="true">
                            *
                        </span>
                    </label>
                    <div class="col-md-4">
                        <input type="text" id="txtNAME" name="NAME" class="form-control" placeholder="请输入角色名称">
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        是否超级管理员&nbsp;&nbsp;
                    </label>
                    <div class="col-md-4" style="padding-top: 7px">
                        <input type="checkbox" id="txtIS_ADMIN" name="IS_ADMIN" class="form-control" value="1">
                        <span class="help-block"></span>
                        <input type="hidden" id="hid_operations" name="hid_operations"/>
                        <input type="hidden" id="hid_otherOperations" name="hid_otherOperations" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        备注
                    </label>
                    <div class="col-md-4">
                        <textarea style="height: 100px;" id="REMARK" class="form-control" placeholder="请输入备注"></textarea>
                        <span class="help-block"></span>
                    </div>
                </div>
            </div>
        </form>
        <!-- END FORM-->
    </div>
    <div class="portlet-body form">
        <ul id="myTab" class="nav nav-tabs tab-color-blue background-blue" style="padding-left: 19px;">
            <li class="active">
                <a href="#operation" data-toggle="tab">选择权限
                </a>
            </li>
        </ul>
        <div class="col-md-12">
            <table class="table table-striped table-hover table-bordered" id="dtlTable">
                <thead>
                <tr>
                    <th width="15px"><input type="checkbox" id="allChk" name="allChk" onchange="allChkClick()"/></th>
                    <th>模块名称
                    </th>
                    <th>通用权限
                    </th>
                    <th>特殊权限
                    </th>
                </tr>
                </thead>
                <tbody id="dtlContent"></tbody>
            </table>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button type="button" class="btn green" id="sure">确定</button>
                        <a href="@Url.Action("Index")" class="btn default">取消</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section scripts{
    <script src="~/Assets/global/Plugins/jquery-validation/additional-methods.min.js"></script>
    <script src="~/Assets/global/Plugins/bootstrap-daterangepicker/moment.min.js"></script>
    <link href="~/Assets/global/Css/style-metronic.css" rel="stylesheet" />
    @Scripts.Render("~/Scripts/BfRole/Add.js")
}

@section header{
    <style>
        #treebox
        {
            height: 430px;
        }

        .tfbox .form-body
        {
            padding: 0 10px;
        }

        .tfbox-tree
        {
            padding-top: 10px;
            position: relative;
            overflow: auto;
        }

            .tfbox-tree .ui-title
            {
                font-size: 14px;
                color: #e26a6a;
                font-weight: bold;
            }

        .tfbox-form
        {
            padding-top: 20px;
            border-left: 1px solid #474747;
            padding-left: 0px;
            padding-right: 0px;
            overflow: hidden;
        }

        .tfbox .control-label
        {
            line-height: initial;
        }

        /*.tfbox .checker
        {
            margin-top: 8px !important;
        }*/

        .tfbox .ui-text
        {
            height: 26px;
            display: inline-block;
        }

        .tfbox .form-control-static
        {
            margin: 0;
        }

        .tfbox .form-action
        {
            width: 97.5%;
            background: #f5f5f5;
            border-top: 1px solid #e5e5e5;
            text-align: center;
            padding: 20px;
        }

        .tfbox .form-tree-actions
        {
            text-align: right;
            position: absolute;
            right: 12px;
        }

        .tfbox .icon-add
        {
            font-size: 16px;
        }

        .tfbox .btn-switch
        {
            display: inline-block;
        }
    </style>
}